<template>
    <div id="bread">
        <el-breadcrumb separator="/">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item :to="{ path: RoutePath }">
                <slot></slot>
            </el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                RoutePath: ""
            }
        },
        mounted () {
            this.getRoutePath();
        },
        methods: {
            // 获取路由路径
            getRoutePath() {
                this.RoutePath = this.$route.path
            },
        },
    }
</script>

<style lang="scss" scoped>
    #bread {
        width: 100%;
        padding: 20px 0;
        box-sizing: border-box;
        
    }
</style>